<?php

include("mysql_conn.php");

$state=mysql_real_escape_string($_GET["state"]);
$projectid=mysql_real_escape_string($_GET["projectid"]);

$sql="update projects set state='$state' where projectid='$projectid'";

if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
echo "<html><head><meta http-equiv='refresh' content='0;url=editproj.php?projectid=$projectid'><link rel='stylesheet' type='text/css' href='style.css'></head><body>
Project marked successfully.<p>
<a href='editproj.php?projectid=$projectid'>Return to Project</a>
</body></html>";

mysql_close($con)
?>
